package com.kun.demo01;

//创建线程的方式1：继承Thread类
public class ThreadCreate01 extends Thread {
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            System.out.println("我正在写代码: " + i);
        }
        super.run();
    }

    public static void main(String[] args) {
        ThreadCreate01 threadCreate01 = new ThreadCreate01();
        threadCreate01.start();
        for (int i = 0; i < 1000; i++) {
            System.out.println("我在学习多线程: " + i);
        }
        System.out.println("主线程结束");
    }
}
